<?php
/**
 * pkx 配置文件
 * Author: ZeonWang
 * Date: 2017/11/23
 * Time: 10:38
 * Created by PhpStorm.
 */

return [
    'force_locale' => env('FORCE_LOCALE', null),

    'route_debug' => env('ROUTE_DEBUG', false), // 可否访问 debug 路由

    'open_wechat' => [
        'app_id'  => env('OPEN_WECHAT_APPID'),
        'secret'  => env('OPEN_WECHAT_SECRET'),
        'token'   => env('OPEN_WECHAT_TOKEN'),
        'aes_key' => env('OPEN_WECHAT_AES_KEY'),
        'debug'   => env('OPEN_WECHAT_DEBUG', false),
        'pay_sandbox'   => env('OPEN_WECHAT_PAY_SANDBOX', false),
        'online_acs_token_api' => env('OPEN_WECHAT_ONLINE_ACS_TOKEN_API', null),
        'cache_driver' => env('OPEN_WECHAT_CACHE_DRIVER', null)
    ],

    'wechat' => [
        'user_info_url' => env('WECHAT_USER_INFO_URL'),
        'jssdk_debug' => env('WECHAT_JSSDK_DEBUG', false)
    ],

    'service_email' => env('SERVICE_EMAIL', 'mozhuangjing@qq.com'),

    'proxies' => explode(',', env('TRUST_PROXIES',
        '127.0.0.1,192.168.1.1,192.168.0.1'
    )),

    'phantom_js_path' => env('PHANTOM_JS_PATH'),  // 采集JavaScript动态渲染的页面需要用到的文件，Windows与Linux分别使用不同的文件

    'tenCent_ai' => [
        'app_id'  => env('TENCENT_AI_APPID'),
        'app_key' => env('TENCENT_AI_APPKEY'),
    ],

    'node_crawler_url' => env('NODE_CRAWLER_URL'), // node实现爬虫的API地址

    'admin_login_debug_token' => env('ADMIN_LOGIN_DEBUG_TOKEN', 'panx'),

    'oss' => [
        'access_key_id'     => env('OSS_ACCESS_KEY_ID'),
        'access_key_secret' => env('OSS_ACCESS_KEY_SECRET'),
        'endpoint'          => env('OSS_ENDPOINT'),
        'bucket'            => env('OSS_BUCKET'),
    ],

    'baidu' => [
        /**
         * @used-by \App\Services\BaiduGeoService\MapApi::geoCodeReverseQuery()
         */
        'api_ak' => env('BAIDU_API_AK'),
    ],

    'youzan' => [
        'client_id' => env('YOUZAN_CLIENT_ID'),
        'client_secret' => env('YOUZAN_CLIENT_SECRET')
    ],

    'ali' => [
        'open_platform' => [
            'app_id' => env('ALI_OPEN_PLATFORM_APP_ID'),
            // @link https://e.alipay.com/merchant/accountDetail.htm - 支付宝唯一用户号
            'alipay_pid' => env('ALI_OPEN_PLATFORM_ALIPAY_PID'),

            // 沙箱测试
            'app_id_sandbox' => env('ALI_OPEN_PLATFORM_APP_ID_SANDBOX'),
            'alipay_pid_sandbox' => env('ALI_OPEN_PLATFORM_ALIPAY_PID_SANDBOX'),
        ]
    ],

    /**
     * Laravel Dusk e2e 测试配置
     */
    'dusk' => [
        // 根据 env 修改 浏览器的尺寸，只对 chrome 有效
        'env'      => env('PKX_DUSK_ENV', \Tests\Utils\PanxData::DUSK_ENV_ADMIN),
        // 是否使用 headless（无界面）浏览器，只对 chrome 有效
        'headless' => env('PKX_DUSK_HEADLESS', true),
    ],

    'custom' => [
        // 不显示收藏列表的用户 IDs 用 , 隔开
        'customer_ids_not_show_favor' => array_filter(explode(',', env('CUSTOMER_IDS_NOT_SHOW_FAVOR')))
    ]
];